import { createRouter, createWebHistory } from 'vue-router';
const routes = [
    { path: '/', redirect: '/dashboard' },
    {
        path: '/dashboard', component: () => import('@/pages/HelloWorld.vue'), children: [
            // 子路由路径开头不带斜杠/
            { path: 'children', component: () => import('@/pages/PythonSample.vue') }
        ]
    }
]

// createRouter替换旧版的new Router()
const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router;
